#!/bin/bash

read -p "what file do you want to test?  " filename

if [ -e "${filaname}" ]; then
    echo "the file does not exist!"
    exit 1
fi

if [ -r "${filename}" ]; then
    echo "the file is readable!"
fi

if [ -w "${filename}" ]; then
    echo "the file is writeable!"
fi

if [ -x "${filename}" ]; then
    echo "the file is execuable!"
fi